cmake_minimum_required(VERSION 2.6)
include(FindPkgConfig)

#definition du projet
project (dpglib)

set(EXECUTABLE_OUTPUT_PATH bin${CMAKE_BUILD_TYPE})
set(LIBRARY_OUTPUT_PATH lib/${CMAKE_BUILD_TYPE})
set(package_name dpglib)
set(package_version svn0.2)
set(email_report alexisis-pristontale@hotmail.com)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
SET(CMAKE_VERBOSE_MAKEFILE OFF)

#identification des fichiers
set(
	extract
	src/dpgextract/main.c
)
set(
	header
	src/header/DpgHeader.h
	src/header/dpglib.h
)
set(
	lib
	src/lib/dpglib.c
	src/lib/utils.c
	src/lib/utils.h
)

#check library
pkg_check_modules(REQUIRED gstreamer gstreamer-0.10 )

#add include dir
include_directories(src/header)
link_directories(${LIBRARY_OUTPUT_PATH})
#creating file
add_library(
	dpg
	SHARED
	${header} ${lib} ${gstreamer_INCLUDE_DIRS}
)
add_executable(
	extractdpg
	${header} ${extract} ${gstreamer_INCLUDE_DIRS}
)
target_link_libraries(
	extractdpg
	dpg ${gstreamer_LIBRARIES}
)
target_link_libraries(
	dpg
	${gstreamer_LIBRARIES}
)
